import request from '@/utils/request'
export default {
    //1 添加课程信息
    addCourseInfo(courseInfo) {
        return request({
            url: '/eduservice/course/addCourseInfo',
            method: 'post',
            data:courseInfo
          })
    },
    //2 查询所有讲师
    getListTeacher() {
        return request({
            url: '/eduservice/teacher/findAll',
            method: 'get'
          })
    },
    //根据课程id插叙嗯课程基本信息
  getCourseInfoId(id) {
    return request({
      url: '/eduservice/course/getCourseInfo/'+id,
      method: 'get'
    })
  },

  //修改课程信息
  uddateCourseInfoId(courseInfo) {
    return request({
      url: '/eduservice/course/updateCourseInfo/',
      method: 'post',
      data:courseInfo
    })
  },


  getPublishCourseInfo(id) {
    return request({
      url: `/eduservice/course/getPublishCourseInfo/${id}`,
      method: 'get',
    })
  },

  publishCourse1(id) {
    return request({
      url: `/eduservice/course/publishCourse/${id}`,
      method: 'post',
    })
  },

  // 讲师列表（综合查询带分页）
  getCourseListPage(current,limit,CourseQuery){
    return request({
      url: `/eduservice/course/pageCourseQuery/${current}/${limit}`,
      method: 'post',
      data:CourseQuery
    })
  },

  //删除
  delCourse(id){
    return request({
      url:`/eduservice/course/delCourse/${id}`,
      method:'delete'
    })
  },
}
